﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Molic.Core.Controls.interfaces;

namespace Molic.ShapeLibrary
{
    public class MolicModelIdentifier : IMolicIdentifier
    {
        #region IMolicIdentifier Members

        public string IdentifyModel(object Content)
        {
            if (Content is System.Windows.Shapes.Shape)
            {
                // TODO: create a new class to do this
                string name = ((System.Windows.Shapes.Shape)Content).ToolTip as string;
                name = name.Replace(' ', '_');
                if (string.IsNullOrEmpty(name))
                    return "Unkown";
                return name;
            }
            return "Unkown";
        }

        #endregion
    }
}
